package com.fenger.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @PackageName: com.fenger.servlet
 * @ClassName: PageServlet
 * @Description:
 * @author: fang
 * @date: 2021/10/31 11:05
 */
@WebServlet(name = "page", urlPatterns = "/page")
public class PageServlet extends HttpServlet {

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        PrintWriter writer = resp.getWriter();
        writer.write("<html>");
        writer.write("<head>");
        writer.write("</head>");
        writer.write("<body>");
        writer.write("<font color='red' size='20px'>登录</font>");
        writer.write("<form action='login' method='get'>");
        writer.write("用户名:<input type='text' name='username' value=''/><br/>");
        writer.write("密码:<input type='password' name='password' value=''/><br/>");
        writer.write("<input type='submit'  value='登录'/><br/>");
        writer.write("</form>");
        writer.write("</body>");
        writer.write("</html>");
    }
}
